/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package propres;

/**
 *
 * @author david
 */
import java.*;
import java.util.*;
import java.io.*;
public class dmain_final {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)throws Exception{
     
     g_disco diet = new g_discod();
     g_disco per=new   g_discop(); 
     g_disco al=new   g_discoa(); 
     List list = new ArrayList();
     estrucdieta di= new estrucdieta();
     estrucalim alim = new estrucalim();
     estrucliente clie=new estrucliente();
     //----------inicializamos clientes
     cliente c1= new cliente("david", "g1",123,"calle1");
     cliente c2= new cliente("miguel", "gfr1",123,"calle2");
     cliente c3= new cliente("jose", "gfrs",123,"calle3");
     cliente c4= new cliente("javi", "gfrg",123,"calle4");
     cliente c5= new cliente("manolo", "gftg",123,"calle5");
     clie.añadir_cliente(c1);
     clie.añadir_cliente(c2);
     clie.añadir_cliente(c3);
     clie.añadir_cliente(c4);       
      clie.añadir_cliente(c5);  
      per.guardar_objecte(clie);
      
      list=clie.listar_clientes();
      System.out.println(list);  
      
      
      
 //----------inicializamos alimentos
Date o = new Date(2008,11,10);
Date u = new Date(2009,12,12);
Interval q = new Interval(o,o);
alimento b = new alimento("platano",20,10,15,36,"ABCD",q,100,10010,"ot",111);
alimento c = new alimento("manzana",20,10,15,36,"ABCD",q,10000,10110,"pri",111);
alimento d = new alimento("pera",20,10,15,36,"ABCD",q,10000,10111,"prive",111);
alimento a = new alimento("carne",20,10,15,36,"ABCD",q,100,10010,"ot",111);
alimento e = new alimento("pescado",20,10,15,36,"ABCD",q,10000,10110,"pri",111);
alimento f = new alimento("pollo",20,10,15,36,"ABCD",q,10000,10111,"prive",111);

alim.añadir_alimento(b);
alim.añadir_alimento(c);
alim.añadir_alimento(d);
alim.añadir_alimento(a);
alim.añadir_alimento(e);
alim.añadir_alimento(f);
al.guardar_objecte(alim);
list=alim.consultar_alimentos();
System.out.println(list);
////inicializamos dietas
dieta d1=new dieta();
dieta d2=new dieta();
dieta d3=new dieta();
dieta d4=new dieta();
dieta d5=new dieta();
di.añadir_dieta(d1);
di.añadir_dieta(d2);
di.añadir_dieta(d3);
di.añadir_dieta(d4);
di.añadir_dieta(d5);
diet.guardar_objecte(di);
list=alim.consultar_alimentos();
Map m = Collections.synchronizedMap(new TreeMap());


//////operaciones-----------


        // TODO code application logic here
    }

}
